package com.xy.breakfast.service;

import com.xy.breakfast.entity.Cart;
import com.xy.breakfast.mapper.CartMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartService implements CartMapper {

    @Autowired
    CartMapper cartMapper;

    @Override
    public Cart getById(int id) {
        return cartMapper.getById(id);
    }

    @Override
    public void save(Cart t) {
        cartMapper.save(t);
    }

    @Override
    public void deleteById(int id) {
        cartMapper.deleteById(id);
    }

    @Override
    public void update(Cart t) {
        cartMapper.update(t);
    }

    @Override
    public List<Cart> getByClientsId(int clientsId) {
        return cartMapper.getByClientsId(clientsId);
    }

    @Override
    public List<Cart> getAll() {
        return getAll();
    }

    @Override
    public List<Cart> getPage(int start, int end) {
        return getPage(start,end);
    }
}
